#lang rosetta-racket


(require "crater-tessellation.rkt")

(provide crater-tessellation-example)


(define (wavy-skin)
  (make-simple-skin
   (λ (u v)
     (xyz u v (* 0.4 (+ (sin (+ u v)) (* 0.1 (abs (- u 1))) (sin (- v 1))))))
   (make-uv-domain 'closed 0 'closed 3
                   'closed 0 'closed 6)))

(define (crater-tessellation-example)
  (view
   (xyz 27.521296387440653 2.92565065918974 20.063346630748686)
   (xyz 0.13265326913544853 3.0018103249070553 -1.0082883623172567)
   (perspective 197)
   (crater-tessellation (wavy-skin) 10 20)))